package com.mobile.check.db;

import java.util.List;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.query.Query;
import org.greenrobot.greendao.query.QueryBuilder;

import com.mobile.check.beans.TaskItemInfo;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** 
 * DAO for table "TASK_ITEM_INFO".
*/
public class TaskItemInfoDao extends AbstractDao<TaskItemInfo, Long> {

    public static final String TABLENAME = "TASK_ITEM_INFO";

    /**
     * Properties of entity TaskItemInfo.<br/>
     * Can be used for QueryBuilder and for referencing column names.
     */
    public static class Properties {
        public final static Property _ID = new Property(0, Long.class, "_ID", true, "_id");
        public final static Property ParentId = new Property(1, Long.class, "parentId", false, "PARENT_ID");
        public final static Property TaskName = new Property(2, String.class, "taskName", false, "TASK_NAME");
        public final static Property TestId = new Property(3, String.class, "testId", false, "TEST_ID");
        public final static Property Device = new Property(4, String.class, "device", false, "DEVICE");
        public final static Property Area = new Property(5, String.class, "area", false, "AREA");
        public final static Property Equipment = new Property(6, String.class, "equipment", false, "EQUIPMENT");
        public final static Property Label = new Property(7, String.class, "label", false, "LABEL");
        public final static Property LocationDesc = new Property(8, String.class, "locationDesc", false, "LOCATION_DESC");
        public final static Property AssemblyType = new Property(9, String.class, "assemblyType", false, "ASSEMBLY_TYPE");
        public final static Property AssemblyChildType = new Property(10, String.class, "assemblyChildType", false, "ASSEMBLY_CHILD_TYPE");
        public final static Property LeakValue = new Property(11, String.class, "leakValue", false, "LEAK_VALUE");
        public final static Property MinStopTime = new Property(12, String.class, "minStopTime", false, "MIN_STOP_TIME");
        public final static Property TestDate = new Property(13, String.class, "testDate", false, "TEST_DATE");
        public final static Property RepeatDate = new Property(14, String.class, "repeatDate", false, "REPEAT_DATE");
        public final static Property TestDevice = new Property(15, String.class, "testDevice", false, "TEST_DEVICE");
        public final static Property RepeatDevice = new Property(16, String.class, "repeatDevice", false, "REPEAT_DEVICE");
        public final static Property TestValue = new Property(17, String.class, "testValue", false, "TEST_VALUE");
        public final static Property RepeatValue = new Property(18, String.class, "repeatValue", false, "REPEAT_VALUE");
        public final static Property RepeatTestValue = new Property(19, String.class, "repeatTestValue", false, "REPEAT_TEST_VALUE");
        public final static Property IsLeak = new Property(20, String.class, "isLeak", false, "IS_LEAK");
        public final static Property LeakLocation = new Property(21, String.class, "leakLocation", false, "LEAK_LOCATION");
        public final static Property BackGround = new Property(22, String.class, "backGround", false, "BACK_GROUND");
        public final static Property TestPerson = new Property(23, String.class, "testPerson", false, "TEST_PERSON");
        public final static Property RepeatPerson = new Property(24, String.class, "repeatPerson", false, "REPEAT_PERSON");
        public final static Property TestPic = new Property(25, String.class, "testPic", false, "TEST_PIC");
        public final static Property Desc = new Property(26, String.class, "desc", false, "DESC");
        public final static Property Indoor = new Property(27, String.class, "indoor", false, "INDOOR");
        public final static Property TestPath = new Property(28, String.class, "testPath", false, "TEST_PATH");
        public final static Property LeakSpeed = new Property(29, String.class, "leakSpeed", false, "LEAK_SPEED");
        public final static Property LeakFilePath = new Property(30, String.class, "leakFilePath", false, "LEAK_FILE_PATH");
        public final static Property IsHadTest = new Property(31, boolean.class, "isHadTest", false, "IS_HAD_TEST");
        public final static Property IsQualified = new Property(32, boolean.class, "isQualified", false, "IS_QUALIFIED");
        public final static Property RepairDate = new Property(33, String.class, "repairDate", false, "REPAIR_DATE");
        public final static Property RepairMethed = new Property(34, String.class, "repairMethed", false, "REPAIR_METHED");
        public final static Property RepairPerson = new Property(35, String.class, "repairPerson", false, "REPAIR_PERSON");
        public final static Property FilePath = new Property(36, String.class, "filePath", false, "FILE_PATH");
        public final static Property CellIndex = new Property(37, int.class, "cellIndex", false, "CELL_INDEX");
        public final static Property RowIndex = new Property(38, int.class, "rowIndex", false, "ROW_INDEX");
        public final static Property Title = new Property(39, String.class, "title", false, "TITLE");
    }

    private Query<TaskItemInfo> taskInfo_ItemInfoListQuery;

    public TaskItemInfoDao(DaoConfig config) {
        super(config);
    }
    
    public TaskItemInfoDao(DaoConfig config, DaoSession daoSession) {
        super(config, daoSession);
    }

    /** Creates the underlying database table. */
    public static void createTable(Database db, boolean ifNotExists) {
        String constraint = ifNotExists? "IF NOT EXISTS ": "";
        db.execSQL("CREATE TABLE " + constraint + "\"TASK_ITEM_INFO\" (" + //
                "\"_id\" INTEGER PRIMARY KEY ," + // 0: _ID
                "\"PARENT_ID\" INTEGER," + // 1: parentId
                "\"TASK_NAME\" TEXT," + // 2: taskName
                "\"TEST_ID\" TEXT," + // 3: testId
                "\"DEVICE\" TEXT," + // 4: device
                "\"AREA\" TEXT," + // 5: area
                "\"EQUIPMENT\" TEXT," + // 6: equipment
                "\"LABEL\" TEXT," + // 7: label
                "\"LOCATION_DESC\" TEXT," + // 8: locationDesc
                "\"ASSEMBLY_TYPE\" TEXT," + // 9: assemblyType
                "\"ASSEMBLY_CHILD_TYPE\" TEXT," + // 10: assemblyChildType
                "\"LEAK_VALUE\" TEXT," + // 11: leakValue
                "\"MIN_STOP_TIME\" TEXT," + // 12: minStopTime
                "\"TEST_DATE\" TEXT," + // 13: testDate
                "\"REPEAT_DATE\" TEXT," + // 14: repeatDate
                "\"TEST_DEVICE\" TEXT," + // 15: testDevice
                "\"REPEAT_DEVICE\" TEXT," + // 16: repeatDevice
                "\"TEST_VALUE\" TEXT," + // 17: testValue
                "\"REPEAT_VALUE\" TEXT," + // 18: repeatValue
                "\"REPEAT_TEST_VALUE\" TEXT," + // 19: repeatTestValue
                "\"IS_LEAK\" TEXT," + // 20: isLeak
                "\"LEAK_LOCATION\" TEXT," + // 21: leakLocation
                "\"BACK_GROUND\" TEXT," + // 22: backGround
                "\"TEST_PERSON\" TEXT," + // 23: testPerson
                "\"REPEAT_PERSON\" TEXT," + // 24: repeatPerson
                "\"TEST_PIC\" TEXT," + // 25: testPic
                "\"DESC\" TEXT," + // 26: desc
                "\"INDOOR\" TEXT," + // 27: indoor
                "\"TEST_PATH\" TEXT," + // 28: testPath
                "\"LEAK_SPEED\" TEXT," + // 29: leakSpeed
                "\"LEAK_FILE_PATH\" TEXT," + // 30: leakFilePath
                "\"IS_HAD_TEST\" INTEGER NOT NULL ," + // 31: isHadTest
                "\"IS_QUALIFIED\" INTEGER NOT NULL ," + // 32: isQualified
                "\"REPAIR_DATE\" TEXT," + // 33: repairDate
                "\"REPAIR_METHED\" TEXT," + // 34: repairMethed
                "\"REPAIR_PERSON\" TEXT," + // 35: repairPerson
                "\"FILE_PATH\" TEXT," + // 36: filePath
                "\"CELL_INDEX\" INTEGER NOT NULL ," + // 37: cellIndex
                "\"ROW_INDEX\" INTEGER NOT NULL ," + // 38: rowIndex
                "\"TITLE\" TEXT);"); // 39: title
    }

    /** Drops the underlying database table. */
    public static void dropTable(Database db, boolean ifExists) {
        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_ITEM_INFO\"";
        db.execSQL(sql);
    }

    @Override
    protected final void bindValues(DatabaseStatement stmt, TaskItemInfo entity) {
        stmt.clearBindings();
 
        Long _ID = entity.get_ID();
        if (_ID != null) {
            stmt.bindLong(1, _ID);
        }
 
        Long parentId = entity.getParentId();
        if (parentId != null) {
            stmt.bindLong(2, parentId);
        }
 
        String taskName = entity.getTaskName();
        if (taskName != null) {
            stmt.bindString(3, taskName);
        }
 
        String testId = entity.getTestId();
        if (testId != null) {
            stmt.bindString(4, testId);
        }
 
        String device = entity.getDevice();
        if (device != null) {
            stmt.bindString(5, device);
        }
 
        String area = entity.getArea();
        if (area != null) {
            stmt.bindString(6, area);
        }
 
        String equipment = entity.getEquipment();
        if (equipment != null) {
            stmt.bindString(7, equipment);
        }
 
        String label = entity.getLabel();
        if (label != null) {
            stmt.bindString(8, label);
        }
 
        String locationDesc = entity.getLocationDesc();
        if (locationDesc != null) {
            stmt.bindString(9, locationDesc);
        }
 
        String assemblyType = entity.getAssemblyType();
        if (assemblyType != null) {
            stmt.bindString(10, assemblyType);
        }
 
        String assemblyChildType = entity.getAssemblyChildType();
        if (assemblyChildType != null) {
            stmt.bindString(11, assemblyChildType);
        }
 
        String leakValue = entity.getLeakValue();
        if (leakValue != null) {
            stmt.bindString(12, leakValue);
        }
 
        String minStopTime = entity.getMinStopTime();
        if (minStopTime != null) {
            stmt.bindString(13, minStopTime);
        }
 
        String testDate = entity.getTestDate();
        if (testDate != null) {
            stmt.bindString(14, testDate);
        }
 
        String repeatDate = entity.getRepeatDate();
        if (repeatDate != null) {
            stmt.bindString(15, repeatDate);
        }
 
        String testDevice = entity.getTestDevice();
        if (testDevice != null) {
            stmt.bindString(16, testDevice);
        }
 
        String repeatDevice = entity.getRepeatDevice();
        if (repeatDevice != null) {
            stmt.bindString(17, repeatDevice);
        }
 
        String testValue = entity.getTestValue();
        if (testValue != null) {
            stmt.bindString(18, testValue);
        }
 
        String repeatValue = entity.getRepeatValue();
        if (repeatValue != null) {
            stmt.bindString(19, repeatValue);
        }
 
        String repeatTestValue = entity.getRepeatTestValue();
        if (repeatTestValue != null) {
            stmt.bindString(20, repeatTestValue);
        }
 
        String isLeak = entity.getIsLeak();
        if (isLeak != null) {
            stmt.bindString(21, isLeak);
        }
 
        String leakLocation = entity.getLeakLocation();
        if (leakLocation != null) {
            stmt.bindString(22, leakLocation);
        }
 
        String backGround = entity.getBackGround();
        if (backGround != null) {
            stmt.bindString(23, backGround);
        }
 
        String testPerson = entity.getTestPerson();
        if (testPerson != null) {
            stmt.bindString(24, testPerson);
        }
 
        String repeatPerson = entity.getRepeatPerson();
        if (repeatPerson != null) {
            stmt.bindString(25, repeatPerson);
        }
 
        String testPic = entity.getTestPic();
        if (testPic != null) {
            stmt.bindString(26, testPic);
        }
 
        String desc = entity.getDesc();
        if (desc != null) {
            stmt.bindString(27, desc);
        }
 
        String indoor = entity.getIndoor();
        if (indoor != null) {
            stmt.bindString(28, indoor);
        }
 
        String testPath = entity.getTestPath();
        if (testPath != null) {
            stmt.bindString(29, testPath);
        }
 
        String leakSpeed = entity.getLeakSpeed();
        if (leakSpeed != null) {
            stmt.bindString(30, leakSpeed);
        }
 
        String leakFilePath = entity.getLeakFilePath();
        if (leakFilePath != null) {
            stmt.bindString(31, leakFilePath);
        }
        stmt.bindLong(32, entity.getIsHadTest() ? 1L: 0L);
        stmt.bindLong(33, entity.getIsQualified() ? 1L: 0L);
 
        String repairDate = entity.getRepairDate();
        if (repairDate != null) {
            stmt.bindString(34, repairDate);
        }
 
        String repairMethed = entity.getRepairMethed();
        if (repairMethed != null) {
            stmt.bindString(35, repairMethed);
        }
 
        String repairPerson = entity.getRepairPerson();
        if (repairPerson != null) {
            stmt.bindString(36, repairPerson);
        }
 
        String filePath = entity.getFilePath();
        if (filePath != null) {
            stmt.bindString(37, filePath);
        }
        stmt.bindLong(38, entity.getCellIndex());
        stmt.bindLong(39, entity.getRowIndex());
 
        String title = entity.getTitle();
        if (title != null) {
            stmt.bindString(40, title);
        }
    }

    @Override
    protected final void bindValues(SQLiteStatement stmt, TaskItemInfo entity) {
        stmt.clearBindings();
 
        Long _ID = entity.get_ID();
        if (_ID != null) {
            stmt.bindLong(1, _ID);
        }
 
        Long parentId = entity.getParentId();
        if (parentId != null) {
            stmt.bindLong(2, parentId);
        }
 
        String taskName = entity.getTaskName();
        if (taskName != null) {
            stmt.bindString(3, taskName);
        }
 
        String testId = entity.getTestId();
        if (testId != null) {
            stmt.bindString(4, testId);
        }
 
        String device = entity.getDevice();
        if (device != null) {
            stmt.bindString(5, device);
        }
 
        String area = entity.getArea();
        if (area != null) {
            stmt.bindString(6, area);
        }
 
        String equipment = entity.getEquipment();
        if (equipment != null) {
            stmt.bindString(7, equipment);
        }
 
        String label = entity.getLabel();
        if (label != null) {
            stmt.bindString(8, label);
        }
 
        String locationDesc = entity.getLocationDesc();
        if (locationDesc != null) {
            stmt.bindString(9, locationDesc);
        }
 
        String assemblyType = entity.getAssemblyType();
        if (assemblyType != null) {
            stmt.bindString(10, assemblyType);
        }
 
        String assemblyChildType = entity.getAssemblyChildType();
        if (assemblyChildType != null) {
            stmt.bindString(11, assemblyChildType);
        }
 
        String leakValue = entity.getLeakValue();
        if (leakValue != null) {
            stmt.bindString(12, leakValue);
        }
 
        String minStopTime = entity.getMinStopTime();
        if (minStopTime != null) {
            stmt.bindString(13, minStopTime);
        }
 
        String testDate = entity.getTestDate();
        if (testDate != null) {
            stmt.bindString(14, testDate);
        }
 
        String repeatDate = entity.getRepeatDate();
        if (repeatDate != null) {
            stmt.bindString(15, repeatDate);
        }
 
        String testDevice = entity.getTestDevice();
        if (testDevice != null) {
            stmt.bindString(16, testDevice);
        }
 
        String repeatDevice = entity.getRepeatDevice();
        if (repeatDevice != null) {
            stmt.bindString(17, repeatDevice);
        }
 
        String testValue = entity.getTestValue();
        if (testValue != null) {
            stmt.bindString(18, testValue);
        }
 
        String repeatValue = entity.getRepeatValue();
        if (repeatValue != null) {
            stmt.bindString(19, repeatValue);
        }
 
        String repeatTestValue = entity.getRepeatTestValue();
        if (repeatTestValue != null) {
            stmt.bindString(20, repeatTestValue);
        }
 
        String isLeak = entity.getIsLeak();
        if (isLeak != null) {
            stmt.bindString(21, isLeak);
        }
 
        String leakLocation = entity.getLeakLocation();
        if (leakLocation != null) {
            stmt.bindString(22, leakLocation);
        }
 
        String backGround = entity.getBackGround();
        if (backGround != null) {
            stmt.bindString(23, backGround);
        }
 
        String testPerson = entity.getTestPerson();
        if (testPerson != null) {
            stmt.bindString(24, testPerson);
        }
 
        String repeatPerson = entity.getRepeatPerson();
        if (repeatPerson != null) {
            stmt.bindString(25, repeatPerson);
        }
 
        String testPic = entity.getTestPic();
        if (testPic != null) {
            stmt.bindString(26, testPic);
        }
 
        String desc = entity.getDesc();
        if (desc != null) {
            stmt.bindString(27, desc);
        }
 
        String indoor = entity.getIndoor();
        if (indoor != null) {
            stmt.bindString(28, indoor);
        }
 
        String testPath = entity.getTestPath();
        if (testPath != null) {
            stmt.bindString(29, testPath);
        }
 
        String leakSpeed = entity.getLeakSpeed();
        if (leakSpeed != null) {
            stmt.bindString(30, leakSpeed);
        }
 
        String leakFilePath = entity.getLeakFilePath();
        if (leakFilePath != null) {
            stmt.bindString(31, leakFilePath);
        }
        stmt.bindLong(32, entity.getIsHadTest() ? 1L: 0L);
        stmt.bindLong(33, entity.getIsQualified() ? 1L: 0L);
 
        String repairDate = entity.getRepairDate();
        if (repairDate != null) {
            stmt.bindString(34, repairDate);
        }
 
        String repairMethed = entity.getRepairMethed();
        if (repairMethed != null) {
            stmt.bindString(35, repairMethed);
        }
 
        String repairPerson = entity.getRepairPerson();
        if (repairPerson != null) {
            stmt.bindString(36, repairPerson);
        }
 
        String filePath = entity.getFilePath();
        if (filePath != null) {
            stmt.bindString(37, filePath);
        }
        stmt.bindLong(38, entity.getCellIndex());
        stmt.bindLong(39, entity.getRowIndex());
 
        String title = entity.getTitle();
        if (title != null) {
            stmt.bindString(40, title);
        }
    }

    @Override
    public Long readKey(Cursor cursor, int offset) {
        return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
    }    

    @Override
    public TaskItemInfo readEntity(Cursor cursor, int offset) {
        TaskItemInfo entity = new TaskItemInfo( //
            cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // _ID
            cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1), // parentId
            cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskName
            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // testId
            cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // device
            cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // area
            cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // equipment
            cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // label
            cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // locationDesc
            cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // assemblyType
            cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // assemblyChildType
            cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // leakValue
            cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // minStopTime
            cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // testDate
            cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // repeatDate
            cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // testDevice
            cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // repeatDevice
            cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // testValue
            cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // repeatValue
            cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // repeatTestValue
            cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // isLeak
            cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // leakLocation
            cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // backGround
            cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // testPerson
            cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // repeatPerson
            cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // testPic
            cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // desc
            cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // indoor
            cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // testPath
            cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // leakSpeed
            cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // leakFilePath
            cursor.getShort(offset + 31) != 0, // isHadTest
            cursor.getShort(offset + 32) != 0, // isQualified
            cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // repairDate
            cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // repairMethed
            cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // repairPerson
            cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // filePath
            cursor.getInt(offset + 37), // cellIndex
            cursor.getInt(offset + 38), // rowIndex
            cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39) // title
        );
        return entity;
    }
     
    @Override
    public void readEntity(Cursor cursor, TaskItemInfo entity, int offset) {
        entity.set_ID(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
        entity.setParentId(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1));
        entity.setTaskName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
        entity.setTestId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
        entity.setDevice(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
        entity.setArea(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
        entity.setEquipment(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
        entity.setLabel(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
        entity.setLocationDesc(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
        entity.setAssemblyType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
        entity.setAssemblyChildType(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
        entity.setLeakValue(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
        entity.setMinStopTime(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
        entity.setTestDate(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
        entity.setRepeatDate(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
        entity.setTestDevice(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
        entity.setRepeatDevice(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
        entity.setTestValue(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
        entity.setRepeatValue(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
        entity.setRepeatTestValue(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
        entity.setIsLeak(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
        entity.setLeakLocation(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
        entity.setBackGround(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
        entity.setTestPerson(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
        entity.setRepeatPerson(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
        entity.setTestPic(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
        entity.setDesc(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
        entity.setIndoor(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
        entity.setTestPath(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
        entity.setLeakSpeed(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
        entity.setLeakFilePath(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
        entity.setIsHadTest(cursor.getShort(offset + 31) != 0);
        entity.setIsQualified(cursor.getShort(offset + 32) != 0);
        entity.setRepairDate(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
        entity.setRepairMethed(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
        entity.setRepairPerson(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
        entity.setFilePath(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
        entity.setCellIndex(cursor.getInt(offset + 37));
        entity.setRowIndex(cursor.getInt(offset + 38));
        entity.setTitle(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
     }
    
    @Override
    protected final Long updateKeyAfterInsert(TaskItemInfo entity, long rowId) {
        entity.set_ID(rowId);
        return rowId;
    }
    
    @Override
    public Long getKey(TaskItemInfo entity) {
        if(entity != null) {
            return entity.get_ID();
        } else {
            return null;
        }
    }

    @Override
    public boolean hasKey(TaskItemInfo entity) {
        return entity.get_ID() != null;
    }

    @Override
    protected final boolean isEntityUpdateable() {
        return true;
    }
    
    /** Internal query to resolve the "itemInfoList" to-many relationship of TaskInfo. */
    public List<TaskItemInfo> _queryTaskInfo_ItemInfoList(Long parentId) {
        synchronized (this) {
            if (taskInfo_ItemInfoListQuery == null) {
                QueryBuilder<TaskItemInfo> queryBuilder = queryBuilder();
                queryBuilder.where(Properties.ParentId.eq(null));
                taskInfo_ItemInfoListQuery = queryBuilder.build();
            }
        }
        Query<TaskItemInfo> query = taskInfo_ItemInfoListQuery.forCurrentThread();
        query.setParameter(0, parentId);
        return query.list();
    }

}
